<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

$api = app('Dingo\Api\Routing\Router');

$api->version('v1', ['namespace' => 'App\Http\Controllers\Api'], function ($api) {
	//用户注册
	$api->post('/user/register', 'LoginController@register');
	//用户登录
	$api->post('/user/login', 'LoginController@login');
	//用户忘记密码
	$api->post('/user/forget', 'LoginController@forget');
	//发送短信
	$api->post('/user/send_code', 'LoginController@send_code');
    $api->post('/jl_ceshi','VipController@jl_ceshi'); //金龙测试模式
	//第三方发送短信
	$api->post('/user/party','LoginController@party_code');
	$api->any('/pay/notify','PayController@notify');//支付宝回调
	$api->any('/pay/wechat_notify','PayController@wechat_notify');//微信回调

	//首页接口
	$api->post('/home/index', 'HomeController@index');
	$api->post('/home/type', 'HomeController@type');
	$api->post('/home/glist', 'HomeController@glist');
	//按照类型查询商品
	$api->post('/home/type_goods', 'HomeController@type_goods');
	//类别
	$api->post('/home/search_type', 'HomeController@search_type');
	//获取品牌
	$api->post('/home/search_brand','HomeController@search_brand');
	//标签
	$api->post('/home/search_label','HomeController@search_label');
	//搜索
	$api->post('/home/search','HomeController@search');
	//更多商品
	$api->post('/home/more_good','HomeController@more_good');
	//入口类型商品列表
	$api->post('/home/in_good','HomeController@type_good');
	//品牌馆
	$api->post('/home/brand','HomeController@brand');
	//联系方式
	$api->post('/home/linktel','HomeController@linktel');
	//筛选
	$api->post('/home/globle','HomeController@globle');
	//筛选搜索关键字
	$api->post('/home/search_key','HomeController@search_key');
	//删除搜索记录
	$api->post('/home/search_del','HomeController@search_del');
	//为你推荐
	$api->post('/home/commend','HomeController@commend');
	//搜索品牌
	$api->post('/home/globle_brand','HomeController@globle_brand');

	//素材库
	//视频
	$api->post('/source/vedio','SourceController@vedio');
	//图文
	$api->post('/source/pic','SourceController@pic');
	//问答
	$api->post('/source/qanda','SourceController@qanda');
	//图文详情
	$api->post('/source/pic_detail','SourceController@pic_detail');
	//下载量
	$api->post('/source/click','SourceController@click');
	//素材库筛选
	$api->post('/source/search','SourceController@search');
	//商品详情
	$api->post('/goods/detail','GoodController@detail');//商品详情
	$api->post('/goods/attr','GoodController@attr');//商品规格

	//公告详情
	$api->post('/notice/detail','HomeController@n_detail');
	$api->post('/notice/list','HomeController@notice_list');

	//第三方
	$api->post('/party/qq_info','PartyController@qq_info');
	$api->post('/party/qq_info_add','PartyController@qq_info_add');

	//版本信息
	$api->post('/version/index','VersionController@index');
	//拼团开关
	$api->post('/group/switch','GroupController@switch');
	//拼团列表
	$api->post('/group/index','GroupController@index');
	$api->post('/group/detail','GroupController@detail');
	//生成用户的运仓号
	$api->post('/user/test_q','LoginController@test_q');
	$api->group(['middleware' => 'checkApi'], function ($api) {
		//获取用户信息
		$api->post('/user/info','PersonalController@info');
		//更改用户头像
		$api->post('/user/headpic', 'PersonalController@edit_pic');
		//更改信息
		$api->post('/user/editinfo','PersonalController@editinfo');
		//更改密码/二级密码
		$api->post('/user/editpass','PersonalController@editpass');
		//重新绑定手机号/邮箱
		$api->post('/user/binduser','PersonalController@binduser');
		//更改密码
		$api->post('/user/edit_pass','PersonalController@edit_pass');

		//更换手机号(验证登录密码和支付密码)
		$api->post('/user/check_pass','PersonalController@check_pass');
		//我的的钱包
		$api->post('/user/wallet','PersonalController@wallet');
		//转货款
		$api->post('/user/transfer','PersonalController@transfer');
		//我的股票
		$api->post('user/shares','PersonalController@shares');
		//提现
		$api->post('/user/deposit','PersonalController@deposit');
		$api->post('/user/dep_type','PersonalController@dep_type');
		//消息
		$api->post('/user/infomation','PersonalController@infomation');
		//未读数
		$api->post('/user/info_no','PersonalController@info_num');

		//实名认证
		$api->post('/auth/index','AuthController@index');
		//实名认证(执行)
		$api->post('/auth/check','AuthController@check');
		//更改备注
		$api->post('/user/remark','PersonalController@remark');

		//我的云仓库
		$api->post('/store/list','StoreController@list');

		//云仓号
		$api->post('/user/store','StoreController@index');
		//云仓库入库订单
		$api->post('/store/add_goods','StoreController@add_goods');
		$api->post('/store/del_goods','StoreController@del_goods');



		//客户管理

		$api->post('/customer/list','CustomerController@index');
		$api->post('/customer/insert','CustomerController@insert');
		$api->post('/customer/update','CustomerController@update');
		$api->post('/customer/delete','CustomerController@delete');
		$api->post('/customer/detail','CustomerController@detail');
		$api->post('/customer/add_site','CustomerController@add_site');
		$api->post('/customer/edit_site','CustomerController@edit_site');//编辑地址
		$api->post('/customer/update_site','CustomerController@update_site');//编辑地址
		$api->post('/customer/delete_site','CustomerController@delete_site');//删除地址
		$api->post('/customer/is_default','CustomerController@is_default');//删除地址

		//我的团队
		$api->post('/team/list','PersonalController@team');
		$api->post('/team/search','PersonalController@team_search');
		$api->post('/team/detail','PersonalController@team_detail');

		//收货地址
		$api->post('/address/list','AddressController@list');
		//添加
		$api->post('/address/insert','AddressController@insert');
		//编辑加载信息
		$api->post('address/edit','AddressController@edit');
		//编辑
		$api->post('/address/update','AddressController@update');
		//删除
		$api->post('/address/del','AddressController@del');
		//设置为默认地址
		$api->post('/address/is_default','AddressController@is_default');
		//默认地址
		$api->post('/address/default','AddressController@default');

		//发票
		$api->post('/bill/list','BillController@list');
		//添加发票
		$api->post('/bill/insert','BillController@insert');
		//删除发票
		$api->post('/bill/del','BillController@del');
		//编辑发票(加载信息)
		$api->post('/bill/edit','BillController@edit');
		//编辑
		$api->post('/bill/update','BillController@update_bill');

		//提现方式
		$api->post('/paytype/list','PayTypeController@index');
		//添加提现方式
		$api->post('/paytype/insert','PayTypeController@insert');
		//开户行信息
		$api->post('/paytype/bank','PayTypeController@bank');
		//删除
		$api->post('/paytype/del','PayTypeController@del');


		//VIP
		$api->post('/vip/index','VipController@index');
		//

		$api->post('/vip/do_check','VipController@do_check');

		//我的订单
		$api->post('/order/list','OrderController@index');
		$api->post('/order/receipt','OrderController@receipt');
		$api->post('/order/type_order','OrderController@type_order');
		$api->post('/order/detail','OrderController@detail');
		$api->post('/order/logistics','OrderController@logistics');
		$api->post('/order/del','OrderController@del');

		//购物车模块
        $api->post('/cart/add_cart','CartController@add_cart'); //加入购物车
        $api->post('/cart/cart_list','CartController@cart_list'); //购物车列表
        $api->post('/cart/update_cart','CartController@update_cart'); //编辑购物车
        $api->post('/cart/update_cart_an','CartController@update_cart_an'); //编辑购物车
        $api->post('/cart/cart_buy','CartController@cart_buy'); //购物车下单
        $api->post('/cart/add_store','CartController@add_store'); //购物车入库

		//心愿单
		$api->post('/wish/is_exit','WishController@is_exit');//用户的心愿单
		$api->post('/wish/add_wish','WishController@add_wish');//添加心愿
		$api->post('/wish/friends','WishController@friends');//我的好友
		$api->post('/wish/is_energy','WishController@is_energy');//判断当日是否签到
		$api->post('/wish/add_energy','WishController@add_energy');//领取汽油
		$api->post('/wish/wish_log','WishController@wish_log');//心愿记录
		$api->post('/wish/energy_log','WishController@energy_log');//动态日志
		$api->post('/wish/del_energy','WishController@del_energy');//浇水
		$api->post('/wish/friends_home','WishController@friends_home');//好友心愿首页
		$api->post('/wish/friends_energy','WishController@friends_energy');//给好友浇水
		$api->post('/wish/get_wish','WishController@get_wish');//领取心愿物品,加载数据
		$api->post('/wish/create_wish','WishController@create_wish');//领取订单,创建订单
		$api->post('/wish/express','WishController@logistics');//订单物流
		$api->post('/wish/is_auth','WishController@is_auth');//进入心愿单判断用户是否实名认证
		$api->post('/wish/cancle','WishController@cancle');//撤销订单




		//阿里云支付
		$api->post('/pay/alipay','PayController@index');
		//微信支付
		$api->post('/pay/wechat','PayController@wechat');

		//判断数据库是否有该身份证信息
		$api->post('/user/verify_exit','VerifyController@verify_exit');
		//人脸识别获取token
		$api->post('/user/verify_token','VerifyController@verify_token');
		//认证结果
		$api->post('/user/verify_result','VerifyController@verify_result');

		
		//立即抢购
		$api->post('/group/is_buy_sure','GroupController@is_buy_sure');
		//立即抢购，确认订单
		$api->post('/group/is_buy','GroupController@is_buy');
		//我的订单
		$api->post('/group/order','GroupController@order');
		$api->post('/group/order_de','GroupController@order_de');
		$api->post('/group/send_ok','GroupController@send_ok');
		//测试商品是否过期
		$api->post('/group/indate','GroupController@indate');
	});

});
